package com.anzia.reader;

import java.io.PrintWriter;

/**
 *@ClassName PrintWriter_Demo
 *@Description
 *@Author Anzia.
 *@Date 2021/4/9 17:32
 *@Version 1.0
 **/
public class PrintWriter_Demo {
    public static void main(String[] args) throws Exception {
        //创建打印流
        PrintWriter pw = new PrintWriter("static\\print.txt");

        //打印
        pw.println(97);
        pw.println(true);
        pw.print(3.14);
        pw.print('a');

        //关闭
        pw.close();
        System.out.println("执行完毕");
    }
}
